
# 汉诺塔程序编写
def hnt(n,a, b,c):
    if n==1:
        print(a,'--->', c)
    else:
        hnt(n-1, a, c, b)
        hnt(1, a, b, c)
        hnt(n-1,b,a, c)


hnt(2, 'A', 'B', 'C')


